package com.fangqiang.sprint_boot_web1.config;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class PropService {
    @Autowired
    private Props props;

    @Value("${test.param.use.value.annotation}")
    private String hobby;

    @PostConstruct
    public void init(){
        System.out.println(props.getName()+" "+ props.getVersion()+" "+hobby);
    }
}
